package web.controller;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import service.IBorrowService;
import service.impl.BorrowServiceImpl;
import entity.Borrow;

public class AllBorrowCheckServlet extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
       IBorrowService service=new BorrowServiceImpl();
       List<Borrow> borrowList=service.findAllBorrow();
       request.setAttribute("allborrowList", borrowList);
   	   request.getRequestDispatcher("/systemborrowcheck.jsp").forward(request, response);
       //response.sendRedirect("/systemborrowcheck.jsp");
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
      doGet(request, response);
	}

	
}
